import { createRouter, createWebHistory } from "vue-router";

export const menu_router = [
  {
    path: "/map",
    name: "map",
    meta: {
      title: "高德地图",
    },
    component: () => import("../views/map/indexView.vue"),
  },
  {
    path: "/map1",
    name: "map1",
    meta: {
      title: "卫星地图",
    },
    component: () => import("../views/map1/indexView.vue"),
  },
  {
    path: "/map2",
    name: "map2",
    meta: {
      title: "立体图形",
    },
    component: () => import("../views/map2/indexView.vue"),
  },
  {
    path: "/map3",
    name: "map3",
    meta: {
      title: "房源展示",
    },
    component: () => import("../views/map3/indexView.vue"),
  },
  {
    path: "/map4",
    name: "map4",
    meta: {
      title: "搜索",
    },
    component: () => import("../views/map4/indexView.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "layout",
      component: () => import("../views/layout/indexView.vue"),
      children: menu_router,
    },
    // {
    //   path: "/about",
    //   name: "about",
    //   component: () => import("../views/AboutView.vue"),
    // },
  ],
});

export default router;
